Skip to content

[SYCL] Switch build of SYCL runtime to C++17 #3447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 16, 2021
Merged

Conversation

vladimirlaz
Copy link
Contributor

@vladimirlaz vladimirlaz commented Mar 30, 2021

@vladimirlaz
Copy link
Contributor Author

/summary:run

@bader bader requested a review from pvchupin March 31, 2021 06:48
@pvchupin
Copy link
Contributor

In general it's good direction. We should carefully understand impact before merge (and fix associated issues).

Copy link
Contributor

@pvchupin pvchupin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just gating it from accidental merge.

@v-klochkov
Copy link
Contributor

v-klochkov commented Apr 2, 2021

Interesting..., 9bc9b258b9d166a08426d734f428968a878d336a could be built successfully on Windows locally, but failed in CI.
I used 'python buildbot/configure.py; python buildbot/compile.py'. It looks like CI builds differently.

Or it passes locally because of different version of MSVC. I have this:
"Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64"

Signed-off-by: Vyacheslav N Klochkov <[email protected]>
@v-klochkov
Copy link
Contributor

Or it passes locally because of different version of MSVC. I have this:
"Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64"

@vladimirlaz
See the example (extract from our sources). https://godbolt.org/z/cc8cqr4ET
It passes with MSVC versions starting from 19.27, and fails with 19.26 and older.

@vladimirlaz
Copy link
Contributor Author

/summary:run

@pvchupin
Copy link
Contributor

pvchupin commented Apr 5, 2021

@pvchupin pvchupin marked this pull request as ready for review April 5, 2021 16:07
@pvchupin pvchupin requested a review from a team as a code owner April 5, 2021 16:07
@vladimirlaz
Copy link
Contributor Author

@@ -639,7 +639,7 @@ which contains all the symbols required.

## C++ standard

* DPC++ runtime and headers require C++14 at least.
* DPC++ runtime and headers require C++17 at least.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vladimirlaz, could you confirm that there are no runtime library ABI breaking changes requiring us to increment the library version, please?

Copy link
Contributor

@v-klochkov v-klochkov Apr 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea for a separate PR: It would be good to have a static_assert somewhere in SYCL headers that would check that C++ is 17 or higher.
It would give user-friendly message instead of some unexpected compilation errors due to various reasons (using 'if constexpr', auto in template args, inline vars, etc. with C++14 option)

@kbsmith-intel
Copy link
Contributor

I am very concerned about how changing over to C++ 17 requirement might adversely impact users. Seems like this is an API breaking change, and would require rolling major version of sycl headers and libraries.

Copy link
Contributor

@pvchupin pvchupin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holding off for more testing.

Copy link
Contributor

@kbobrovs kbobrovs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also clean-up code redundant with C++17, like this

// Type traits identical to those in std in newer versions. Can be removed when

Is this going to be a different PR?

@vladimirlaz
Copy link
Contributor Author

We should also clean-up code redundant with C++17, like this

// Type traits identical to those in std in newer versions. Can be removed when

Is this going to be a different PR?

Yes this will be done in separate PR

@bader
Copy link
Contributor

bader commented Apr 15, 2021

@pvchupin, ping.

@bader bader marked this pull request as draft April 15, 2021 16:05
@pvchupin pvchupin marked this pull request as ready for review April 16, 2021 02:20
@pvchupin
Copy link
Contributor

@vladimirlaz, please add a description to PR what this patch is doing.

@vladimirlaz vladimirlaz changed the title [SYCL] Uplift SYCL runtime standard to C++17 [SYCL] Switch build of SYCL runtime to C++17 Apr 16, 2021
@vladimirlaz
Copy link
Contributor Author

@vladimirlaz, please add a description to PR what this patch is doing.

done

@pvchupin pvchupin merged commit 63998b1 into intel:sycl Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants